package com.example.day13;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.util.Log;


public class musicReceiver extends BroadcastReceiver {
    Handler handler;
    public musicReceiver(Handler handler){
        this.handler=handler;
    }
    @Override
    public void onReceive(Context context, Intent intent) {
        Log.e("######","接收！！！");
        String aa = intent.getStringExtra("music");
        Message message = new Message();
    message.what=100;
    message.obj=aa;
        handler.sendMessage(message);
}
}
